/*********************************************************
 *********************************************************
 ********************                  *******************
 *************                                ************
 *******                  _oo0oo_                  *******
 ***                     o8888888o                     ***
 *                       88" . "88                       *
 *                       (| -_- |)                       *
 *                       0\  =  /0                       *
 *                     ___/`---'\___                     *
 *                   .' \\|     |// '.                   *
 *                  / \\|||  :  |||// \                  *
 *                 / _||||| -:- |||||- \                 *
 *                |   | \\\  -  /// |   |                *
 *                | \_|  ''\---/''  |_/ |                *
 *                \  .-\__  '-'  ___/-. /                *
 *              ___'. .'  /--.--\  `. .'___              *
 *           ."" '<  `.___\_<|>_/___.' >' "".            *
 *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
 *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
 *      =====`-.____`.___ \_____/___.-`___.-'=====       *
 *                        `=---='                        *
 *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
 *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
 *********************************************************/
package org.jbase.admin.dao;

import java.util.List;
import java.util.Map;

import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.Sql;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;
import org.jbase.admin.entity.AdminMenu;

/**
 * Project: jbase-springboot <br/>
 * File: AdminMenuDao.java <br/>
 * Class: org.jbase.admin.sys.AdminMenuDao <br/>
 * Description: 系统菜单. <br/>
 * Copyright: Copyright (c) 2016 <br/>
 * Company: http://git.oschina.net/liuzp315/Jbase <br/>
 * Makedate: 2016-12-29 12:19:49 <br/>
 * gen by Jbase Coder <br/>
 * 
 * @author liuzhanhong
 * @version 1.0
 * @since 1.0
 */
public interface AdminMenuDao extends BaseMapper<AdminMenu> {

	public void selectPager(PageQuery<?> pageQuery);

	@Sql("select * from admin_menu where sid=?")
	public AdminMenu fetchBySid(String sid);

	@Sql("delete from admin_menu where sid=?")
	public void deleteBySid(String sid);

	public List<AdminMenu> listBySids(Map<String, Object> params);

	List<AdminMenu> selectByLevel(@Param("level") int level);

	List<AdminMenu> selectByParentId(@Param("parentId") int parentId);

	int[] updateSort(List<Map<String, String>> list);

	/**
	 * 描述 : 通过管理员的Sid获取该管理员所有的菜单项. <br/>
	 * <p>
	 * 
	 * @param adminSid
	 * @return
	 */
	public List<AdminMenu> listByAdminSid(@Param("adminSid") String adminSid);
}
